package main.userInterface;

import javax.swing.*;

import main.controller.IslandRunController;
import main.demonutils.io.IOController;
import main.userInterface.hexislandui.HexIslandFrame;


public class UserFrame extends JFrame {

    static IslandRunController controller;
	
	public UserFrame(){
		super("WALLACE'S ISLAND Critters");
        setSize(900,600);
        setResizable(true);
        setLocationRelativeTo(null);
        setDefaultCloseOperation(EXIT_ON_CLOSE);

        //setJMenuBar(createMenuBar());//Menu Bar
      
        //IslandFrame bar = new IslandFrame();
        //IslandCanvas foo = new IslandCanvas();
        //foo.repaint();
        
        //islandPanel.add(foo);
        //Welcome Pane
        //CritterCanvas bar = new CritterCanvas();


        controller = new IslandRunController();
        HexIslandFrame hexIslandFrame = new HexIslandFrame(controller.getCanvas());


        //IOController io = new AbstractIOController();
        //IslandIOToolPanel islandIOFrame = new IslandIOToolPanel(io , controller.getHexIsland());

       // JTabbedPane sideBar = new JTabbedPane();
        //optionsTabPane.addTab("Load and Save", null, saveLoadPanSC ,"Choices for loading and saving the island.");
        //sideBar.addTab("HexIsland Settings",
          //      null,
            //    new HexEditorPanel(controller.getHexIsland(), controller.getCanvas()) ,
              //  "Options for changing the island.");

        //JPanel sideBar = new JPanel();
        //sideBar.setLayout(new BorderLayout());
        //sideBar.add(currentStatus, BorderLayout.NORTH);
       // sideBar.addTab("IO settings" , islandIOFrame);

        //add(hexIslandFrame, BorderLayout.CENTER);
        ///add(sideBar, BorderLayout.EAST);



        this.add(hexIslandFrame);
        //House Keeping
        //validateTree();
        //pack();
        setVisible(true);
        toFront();
	}


    public static void main(String args[]) throws Exception {
    	//System.out.println("FOOFOO");
        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        UserFrame thegui = new UserFrame();

        controller.runLoop();
    }
	
	
}
